package com.face.attendance;

import com.face.attendance.controller.FaceAttendanceController;
import com.face.base.FaceBaseApplication;
import com.face.base.utils.BaiduAiUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Arrays;

@SpringBootApplication
public class FaceAttendanceApplication {

    /**
     * 静态不支持自动注入。
     */
    @Autowired
    private FaceAttendanceController faceAttendanceController;

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(FaceAttendanceApplication.class, args);

//        String[] names = run.getBeanDefinitionNames();
//        Arrays.stream(names).iterator().forEachRemaining(System.out::println);
//        SpringApplication.run(new Class[]{FaceAttendanceApplication.class, FaceBaseApplication.class}, args);
//        new FaceAttendanceApplication().testAutoWired();
    }

    public void testAutoWired(){
        System.out.println("FaceAttendanceApplication 执行了 controller .........");
        faceAttendanceController.test();
    }
}
